﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gl_mes.DAL.MesDB
{
    /// <summary>
    /// 检验单表头信息
    /// </summary>
    [Table("inspect_info")]
    public class InspectInfo
    {
        /// <summary>
        /// ID，主键自增长
        /// </summary>
        [Column("id"),Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 检验单单号
        /// </summary>
        [Column("inspect_no")]
        public string InspectNumber { get; set; }

        /// <summary>
        /// 开单日期
        /// </summary>
        [Column("fill_date")]
        public DateTime FillDate { get; set; }

        /// <summary>
        /// 目标工单（targetProdProcess表）的ID
        /// </summary>
        [Column("pp_id")]
        public int ProdID { get; set; }

        /// <summary>
        /// 工单号
        /// </summary>
        [Column("prod_number")]
        public string ProdNumber { get; set; }

        /// <summary>
        /// 站点ID
        /// </summary>
        [Column("site_id")]
        public int SiteID { get; set; }

        /// <summary>
        /// 站点名称
        /// </summary>
        [Column("site_name")]
        public string SiteName { get; set; }

        /// <summary>
        /// 异常状态ID
        /// </summary>
        [Column("status_id")]
        public int StatusID { get; set; }

        /// <summary>
        /// 异常状态
        /// </summary>
        [Column("status_name")]
        public string StatusName { get; set; }

        /// <summary>
        /// 投产数量
        /// </summary>
        [Column("prod_qty")]
        public decimal ProdQty { get; set; }

        /// <summary>
        /// 送检数量
        /// </summary>
        [Column("inspect_qty")]
        public decimal InspectQty { get; set; }

        /// <summary>
        /// 合格数量
        /// </summary>
        [Column("pass_qty")]
        public decimal PassQty { get; set; }

        /// <summary>
        /// 不合格数量
        /// </summary>
        [Column("fail_qty")]
        public decimal FailQty { get; set; }


        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }
    }
}
